package com.macro.mall.common.api.exception;


/**
 * 业务异常
 *
 * @author xuyanjun
 * @date 2019-06-01
 */
public class BusinessException extends RuntimeException {

    /**
     * 异常码
     */
    private int code;

    public BusinessException(String message) {
        super(message);
    }

    public BusinessException(String message, int code) {
        super(message);
        this.code = code;
    }

    public BusinessException(String message, Throwable throwable) {
        super(message, throwable);
    }

    public BusinessException(String message, int code, Throwable throwable) {
        super(message, throwable);
        this.code = code;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
